# encoding: utf-8
# module alembic.AbcCoreAbstract
# from C:\Program Files\Python39\lib\site-packages\alembic.cp39-win_amd64.pyd
# by generator 1.147

"""
The AbcCoreAbstract library is an almost-pure abstract library that describes the interfaces that the storage layer (e.g. AbcCoreHDF5) has to implement for Alembic. The AbcCoreAbstract layer specifies the interface for concepts like Objects or Properties, and the byte-size of data. More on the Alembic concepts like Objects or Properties.

One important piece of Alembic that is defined in this layer is Alembic’s notion of time, in the form of the TimeSampling and TimeSamplingType classes. These are non-abstract classes, and provide a rich interface for working with the temporal component of data samples, and are some of the only classes from this layer that are directly and prominently exposed in higher layers.

AbcCoreAbstract is not intended to be the primary human-friendly data-manipulation library in Alembic; that distinction is held by the Abc library.
"""

# imports
from typing import Iterator, Sequence, SupportsIndex, overload

import Boost.Python as __Boost_Python

from .Util import POD

# Variables with simple values

__loader__ = None

__spec__ = None


# no functions
# classes

class AcyclicFlag(__Boost_Python.enum):
    # no doc
    def __init__(self, *args, **kwargs): ...  # real signature unknown

    kAcyclic = 0
    names = {
        'kAcyclic': 0,
    }
    values = {
        0: 0,
    }
    __slots__ = ()


class DataType(__Boost_Python.instance):
    """ The DataType class is a description of how an element of a sample in a Scalar or an Array property is stored """

    @overload
    def __init__(self):
        """ Create an unknown DataType with extent 0 """

    @overload
    def __init__(self, plaintOldDataType: POD):
        """ Create a DataType with the given pod type and extent """

    def __eq__(self, o: object) -> bool: ...

    def __lt__(self, o: object) -> bool: ...

    def __str__(self) -> str: ...

    def __reduce__(self, *args, **kwargs): ...  # real signature unknown

    def getExtent(self) -> int:
        """ Return the 8-bit extent """

    def getNumBytes(self) -> int:
        """ Return the number of bytes occupied by a single datum """

    def getPod(self) -> POD:
        """ Return the PlainOldDataType enum """

    def setExtent(self, extent: int):
        """ Set the 8-bit extent """

    def setPod(self, plainOldDataType: POD):
        """ Set the PlainOldDataType enum """

    __instance_size__ = 24


class MetaData(__Boost_Python.instance):
    """ The MetaData class is an unordered, unique dictionary of strings for describing Protocol for Objects and Interpretation for Properties """

    @overload
    def __init__(self):
        """ Create a MetaData with an empty dictionary """

    @overload
    def __init__(self, metaData: MetaData):
        """ Create a MetaData as a copy of the given MetaData """

    def __str__(self) -> str: ...

    def __reduce__(self, *args, **kwargs): ...  # real signature unknown

    def append(self, metaData: MetaData):
        """ Append the given MetaData. Duplicates are overwritten """

    def appendUnique(self, metaData: MetaData):
        """ Append the given MetaData. Duplicate values will cause an exception to be thrown """

    def get(self, key: str) -> str:
        """ Return the value of the given key or an empty string if it is not set """

    def getRequired(self, key: str) -> str:
        """ Return the value of the given key and throws an exception if it is not found

        Raises:
            RuntimeError: Key did not exist in MetaData
        """

    def getSourceName(self) -> str:
        """ Get the stored source name from the metadata, if any. """

    def matches(self, metaData: MetaData) -> bool:
        """ Return True if each of the fields in the given MetaData are found in this MetaData and have the same values """

    def matchesExactly(self, metaData: MetaData) -> bool:
        """ Return True if the given MetaData is exactly equal to this MetaData in every field """

    def matchesOverlap(self, metaData: MetaData) -> bool:
        """ Return True if, for each of the fields in the given MetaData , this MetaData has either no entry, or the same entry """

    def serialize(self) -> str:
        """ Convert the contents of this MetaData into a single formatted string """

    def set(self, key: str, data: str):
        """ Set a key/data pair (silently ovewrite an existing value) """

    def setUnique(self, key: str, data: str):
        """ Set a key/data pair (throws an exception in attempt to change the value of an existing field, Setting the same value is fine

        Raises:
            RuntimeError: Key already exists in MetaData
        """

    def setIsUV(self, /, x: bool):
        """ Set whether or not this metadata stores UVs. """

    def setReference(self):
        """ Helper function to tag this metadata as being a reference. See isReference() in PropertyHeader for the counterpart. """

    def setSourceName(self, /, x: str):
        """ Set a source name, for later retrieval via getSourceName() """

    def size(self) -> int:
        """ Return the size of the dictionary """

    __instance_size__ = 32


class ObjectHeader(__Boost_Python.instance):
    """ The ObjectHeader is a collection of MetaData which helps define an Object """

    def __init__(self):
        """
        Raises:
            RuntimeError: This class cannot be instantiated from Python
        """

    def __str__(self) -> str: ...

    def __reduce__(self, *args, **kwargs): ...  # real signature unknown

    def getFullName(self) -> str:
        """ Return the full name of the object, which is unique in the whole file """

    def getMetaData(self) -> MetaData:
        """ Return the MetaData of the object """

    def getName(self) -> str:
        """ Return the name of the object, which is unique amongst its siblings """


class PropertyHeader(__Boost_Python.instance):
    """ The PropertyHeader is a collection of MetaData which helps define a Property. It also acts as a key of getting an instance of a Property from a CompoundProperty """

    def __init__(self):
        """
        Raises:
            RuntimeError: This class cannot be instantiated from Python
        """

    def __str__(self) -> str: ...

    def __reduce__(self, *args, **kwargs): ...  # real signature unknown

    def getDataType(self) -> DataType:
        """ Return the DataType of the property. An exception will be thrown if this is called for a CompoundProperty """

    def getMetaData(self) -> MetaData:
        """ Return the MetaData of the property """

    def getName(self) -> str:
        """ Return the name of the property, which is unique amongst its  siblings """

    def isArray(self) -> bool:
        """ Return True if the property is array """

    def isCompound(self) -> bool:
        """ Return True if the property is compound """

    def isReference(self) -> bool:
        """ Return true if the property is tagged as being a reference """

    def isScalar(self) -> bool:
        """ Return True if the property is scalar """

    def isSimple(self) -> bool:
        """ Return True if the property is simple (non-compound) """

    def isUV(self) -> bool:
        """ Return true if the property is tagged as being UVs """


class TimeSampling(__Boost_Python.instance):
    """ The TimeSampling class reports information about the time values  that are associated with the samples written to a Property """

    @overload
    def __init__(self): ...

    @overload
    def __init__(self, timePerCycle: float, startTime: float):
        """ Create a uniform time sampling with the give time per cycle and the given start time """

    @overload
    def __init__(self, timeSamplingType: TimeSamplingType, sampleTimes: TimeVector):
        """ Create a time sampling with the given TimeSamplingType and the time samples per cycle """

    def __eq__(self, o: object) -> bool: ...

    def __reduce__(self, *args, **kwargs): ...  # real signature unknown

    def getCeilIndex(self, time: float, numSamples: int) -> int:
        """ Find the smallest valid index that has a time greater than or equal to the given time """

    def getFloorIndex(self, time: float, numSamples: int) -> int:
        """ Find the largest valid index that as a time less than or equal to the given time """

    def getNearIndex(self, time: float, numSamples: int) -> int:
        """ Find the valid index with the closest time to the given time """

    def getNumStoredTimes(self) -> int:
        """ Return the number of stored times samples """

    def getSampleTime(self, index: int) -> float:
        """ Return the time of the given sample index """

    def getStoredTimes(self) -> TimeVector:
        """ Return the stored times """

    def getTimeSamplingType(self) -> TimeSamplingType:
        """ Return the TimeSamplingType of this class """

    __instance_size__ = 32


class TimeSamplingType(__Boost_Python.instance):
    """ The TimeSamplingType class controls how properties in Alembic relate time values to their samplig indices """

    @overload
    def __init__(self):
        """ Create a uniform TimeSamplingType with the default time per cycle value of 1.0 """

    @overload
    def __init__(self, timePerCycle: float):
        """ Create a uniform TimeSamplingType with the given time per cycle """

    @overload
    def __init__(self, numSamplePerCycle: int, timePerCycle: float):
        """ Create a cyclic TimeSamplingType with the given number of samples per cycle and time per cycle """

    @overload
    def __init__(self, acyclicFlag: AcyclicFlag):
        """ Create an acyclic TimeSamplingType with the give acyclic flag """

    def __eq__(self, o: object) -> bool: ...

    def __str__(self) -> str: ...

    def __reduce__(self, *args, **kwargs): ...  # real signature unknown

    @staticmethod
    def AcyclicNumSamples() -> int:
        """ Return the predefined number of samples per cycle reserved for acyclic sampling type """

    @staticmethod
    def AcyclicTimePerCycle() -> float:
        """ Return the predefined time per cycle reserved for acyclic sampling type """

    def getNumSamplesPerCycle(self) -> int:
        """ Return the number of samples per cycle """

    def getTimePerCycle(self) -> float:
        """ Return the time per cycle """

    def isAcyclic(self) -> bool:
        """ Return True of the sampling type is acyclic (infinit samples per cycle) """

    def isCyclic(self) -> bool:
        """ Return True if the sampling type is cyclic (more than 1 samples per cycle) """

    def isUniform(self) -> bool:
        """ Return True if the sampling type is uniform (1 samples per cycle) """

    __instance_size__ = 32


class TimeVector(__Boost_Python.instance):
    """ TimeVector class holds a list of the sampled times """

    def __init__(self): ...

    def __contains__(self, o: float) -> bool: ...

    def __delitem__(self, i: SupportsIndex): ...

    def __getitem__(self, i: SupportsIndex) -> float: ...

    def __iter__(self) -> Iterator[float]: ...

    def __len__(self) -> int: ...

    def __setitem__(self, i: SupportsIndex, o: float): ...

    def __reduce__(self, *args, **kwargs): ...  # real signature unknown

    def append(self, /, o: float): ...

    def extend(self, /, o: Sequence[float]): ...

    __instance_size__ = 40
